package com.djsearch.widget;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.djsearch.R;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

public class HandImgDialog extends Dialog {

	private Map<String, HandImgListener> handImgListenerList = new HashMap<String, HandImgListener>();
	public HandImgDialog(Context context) {
		super(context);
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.hand_img_dialog);
//		handImgListenerList = new HashMap<String, HandImgListener>();
		TextView cameraImg = (TextView)findViewById(R.id.cameraImg);
		TextView fileImg = (TextView)findViewById(R.id.fileImg);
		cameraImg.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				handImgListenerList.get("cameraImg").handImg();
			}
		});
		fileImg.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				handImgListenerList.get("fileImg").handImg();
			}
		});
	}

	
	public abstract interface HandImgListener {
		public void handImg();
	}
	
	public void setHandImgListener(String handType,HandImgListener handImgListener) {
		handImgListenerList.put(handType,handImgListener);
	}
}
